﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AddTrust.aspx.cs" Inherits="Task.AddTrust" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <base target="_self">
    <link href="css/style.css" rel="stylesheet" rev="stylesheet" />
    <link href="css/global.css" rel="stylesheet" rev="stylesheet" />
    <link href="css/UI_Css/jquery-ui-1.8.17.custom.css" rel="stylesheet" rev="stylesheet" />
    <script type="text/javascript" src="script/jquery-1.7.1.min.js"></script>
    <script type="text/javascript" src="script/jquery-ui-1.8.17.custom.min.js"></script>
    <script type="text/javascript" src="script/My97DatePicker_4.72/My97DatePicker/WdatePicker.js"></script>
</head>
<body>
    <form id="form1" runat="server">
    <table border="0" cellpadding="0" cellspacing="0" width="100%" class="listTable">
        <tr>
            <td colspan="2">
                <h3>
                    <strong>新增委托</strong></h3>
                <hr />
            </td>
        </tr>
        <tr>
            <td>
                所属流程
            </td>
            <td>
                <asp:CheckBoxList ID="cbolist" runat="server">
                </asp:CheckBoxList>
            </td>
        </tr>
        <tr>
            <td>
                <label>
                    开始时间</label>
            </td>
            <td>
                <asp:TextBox ID="txtStartDate" class="Wdate inputboder1" onfocus="var endDate=$dp.$('txtEndDate');WdatePicker({onpicked:function(){},maxDate:'#F{$dp.$D(\'txtEndDate\')}'})"
                    runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                结束时间
            </td>
            <td>
                <asp:TextBox ID="txtEndDate" class="Wdate inputboder1" onfocus="WdatePicker({minDate:'#F{$dp.$D(\'txtStartDate\')}'})"
                    runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                受托人
            </td>
            <td>
                <asp:TextBox ID="txtUser" class="inputboder1" onfocus="ShowSearchUser(0)" runat="server"></asp:TextBox>
                <asp:HiddenField ID="hidUserId" runat="server" />
            </td>
        </tr>
        <tr>
            <td>
                附言
            </td>
            <td>
                <textarea id="txtDesc" runat="server" cols="3" rows="5" style="width: 50%;"></textarea>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <asp:Button ID="btnSave" runat="server" Text="确定" CssClass="btnBg" 
                    onclick="btnSave_Click" />
                <input type="button" value="取消" onclick="closePage()" class="btnBg" id="btnReset" />
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
<script type="text/javascript">
    function CallBack(userId, userName, type) {
        if (type == 0) {
            $("#txtUser").val(userName);
            $("#hidUserId").val(userId);
            $("#btnSave").focus();
        }
    }
    function ShowSearchUser(type) {

        var str = window.showModalDialog("SearchUser.aspx?type=" + type, "", "dialogWidth=500px;dialogHeight=400px;dialogLeft=0px;dialogTop=0px;location=no;");
        if (str != null) {
            var strSplit = str.split(',');
            CallBack(strSplit[0], strSplit[1], strSplit[2])
        }
    }
    function closePage() {
        this.close();
    }
</script>
